package com.YxyBackMange.Entity.App;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Set;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 实体类AppNews
 * 数据表app_tb_news
 * 新闻
 * 2017-12-3 3:47:31
 * @author Administrator
 *
 */
@Table(name = "app_tb_news")
public class AppNews  implements Serializable {

		//
	@Id
	@GeneratedValue(generator = "JDBC")


	private Integer id;
		//标题


	private String title;
		//简介


	private String info;
		//内容


	private String content;
		//创建时间


	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
		//禁用


	private Integer disabled;
		//阅读量


	private Integer readCount;
		//来源


	private String newsSource;

	private String newsTypeId;
	@Transient
	private AppDictCode appDictCode;

	public AppNews(){

	}
	public AppNews(Integer id){
		this.id=id;
	}
	public void setId(Integer id){
		this.id=id;
	}

	public Integer getId(){
		return this.id;
	}
	public void setTitle(String title){
		this.title=title;
	}

	public String getTitle(){
		return this.title;
	}
	public void setInfo(String info){
		this.info=info;
	}

	public AppDictCode getAppDictCode() {
		return appDictCode;
	}

	public void setAppDictCode(AppDictCode appDictCode) {
		this.appDictCode = appDictCode;
	}

	public String getInfo(){
		return this.info;
	}
	public void setContent(String content){
		this.content=content;
	}

	public String getContent(){
		return this.content;
	}
	public void setCreateTime(Date createTime){
		this.createTime=createTime;
	}

	public Date getCreateTime(){
		return this.createTime;
	}
	public void setDisabled(Integer disabled){
		this.disabled=disabled;
	}

	public Integer getDisabled(){
		return this.disabled;
	}
	public void setReadCount(Integer readCount){
		this.readCount=readCount;
	}

	public Integer getReadCount(){
		return this.readCount;
	}
	public void setNewsSource(String newsSource){
		this.newsSource=newsSource;
	}

	public String getNewsSource(){
		return this.newsSource;
	}

	public String getNewsTypeId() {
		return newsTypeId;
	}

	public void setNewsTypeId(String newsTypeId) {
		this.newsTypeId = newsTypeId;
	}

	@Override
	public String toString() {
		return "AppNews{" + "id=" + id + ", title='" + title + '\'' + ", info='" + info + '\'' + ", content='" + content + '\'' + ", createTime=" + createTime + ", disabled=" + disabled + ", readCount=" + readCount + ", newsSource='" + newsSource + '\'' + ", newsTypeId='" + newsTypeId + '\'' + ", appDictCode=" + appDictCode + '}';
	}
}
